package hxy.bytecode.thread.multi;

import java.util.ArrayList;

/**
 * @author eric
 * @program bytecode
 * @description \
 * @date 2021/5/15
 */
public class AddRunnable2 implements Runnable {

    ArrayList<Integer> objects = new ArrayList<>();

    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            objects.add(i);
        }
    }

    public static void main(String[] args) {

        new Thread(new AddRunnable2(), "线程1").start();
        new Thread(new AddRunnable2(), "线程2").start();

    }
}
